<template>
  <div>
    <Demo/>
    <Transfer
      :transForm.sync="transForm"
      :data="transData"
      :defaultProps="defaultProps"
      :defaultCheckedKeys="defaultCheckedKeys"
      @sureSelect="surePerson"
      @cancelSelect="cancelPerson"
    />
    <SearchForm
      v-model="ruleForm"
      :dataJ="dataJ"
      @search-form="searchForm"
      :config="{ seniorFlag: true, autoWidth: '20%' }"
    />
    <BkTable
      :tableHead="tableJ"
      :tableData="tableData"
      :total="total"
      :page="page"
      @getList="getList"
    >
    </BkTable>

    <EditForm
      ref="warningForm"
      v-model="warningForm"
      :dataJ="warningData"
      :ruleJ="warningRules"
    ></EditForm>
  </div>
</template>

<script>
import SideMenu from "@/layout/sideMenu";

export default {
  name: "",
  components: {
    SideMenu,
  },
  data() {
    return {
      transData: [
        {
          id: "421182040001",
          children: [
            {
              id: "1588343323471056897",
              parentId: "421182040001",
              name: "王倩",
              categoryType: "user",
            },
            {
              id: "1595388900876681218",
              parentId: "421182040001",
              name: "陈连宝",
              categoryType: "user",
            },
            {
              id: "1595389297246797826",
              parentId: "421182040001",
              name: "陈玉琴",
              categoryType: "user",
            },
            {
              id: "1595389401932431362",
              parentId: "421182040001",
              name: "刘萍",
              categoryType: "user",
            },
            {
              id: "1604650959979683842",
              parentId: "421182040001",
              name: "月生",
              categoryType: "user",
            },
          ],
          name: "龙坪镇中心卫生院",
          categoryType: "org",
          parentId: 0,
        },
        {
          id: "421182040101",
          parentId: 0,
          children: [
            {
              id: "1595389756602777602",
              parentId: "421182040101",
              name: "郭庆龙",
              categoryType: "user",
            },
            {
              id: "1595389880678678529",
              parentId: "421182040101",
              name: "刘辉涛",
              categoryType: "user",
            },
            {
              id: "1595620209146404865",
              parentId: "421182040101",
              name: "嘉嘉",
              categoryType: "user",
            },
          ],
          name: "下冯村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040201",
          parentId: 0,
          children: [
            {
              id: "1595390056835252225",
              parentId: "421182040201",
              name: "董恩",
              categoryType: "user",
            },
            {
              id: "1595390137386860545",
              parentId: "421182040201",
              name: "陈志芳",
              categoryType: "user",
            },
            {
              id: "1595390234363363329",
              parentId: "421182040201",
              name: "张建武",
              categoryType: "user",
            },
          ],
          name: "大树村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040301",
          parentId: 0,
          children: [
            {
              id: "1595390344983937026",
              parentId: "421182040301",
              name: "项志龙",
              categoryType: "user",
            },
            {
              id: "1595390453679325186",
              parentId: "421182040301",
              name: "程丽雨",
              categoryType: "user",
            },
          ],
          name: "五里村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040401",
          parentId: 0,
          children: [
            {
              id: "1595390630188220417",
              parentId: "421182040401",
              name: "金志勇",
              categoryType: "user",
            },
            {
              id: "1595390745963593730",
              parentId: "421182040401",
              name: "胡征芳",
              categoryType: "user",
            },
          ],
          name: "朝阳村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040501",
          parentId: 0,
          children: [
            {
              id: "1595390977132658689",
              parentId: "421182040501",
              name: "卢克成",
              categoryType: "user",
            },
            {
              id: "1595391089506451457",
              parentId: "421182040501",
              name: "毛晶",
              categoryType: "user",
            },
            {
              id: "1595373835347755010",
              parentId: "421182040501",
              name: "张慧平",
              categoryType: "user",
            },
          ],
          name: "朱河村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040601",
          parentId: 0,
          children: [
            {
              id: "1595391181319766017",
              parentId: "421182040601",
              name: "郭太立",
              categoryType: "user",
            },
            {
              id: "1595391266887761921",
              parentId: "421182040601",
              name: "黄雄",
              categoryType: "user",
            },
            {
              id: "1595391355035254785",
              parentId: "421182040601",
              name: "张春花",
              categoryType: "user",
            },
          ],
          name: "沙墩村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040701",
          parentId: 0,
          children: [
            {
              id: "1595391489194262529",
              parentId: "421182040701",
              name: "王学兵",
              categoryType: "user",
            },
            {
              id: "1595391569318051842",
              parentId: "421182040701",
              name: "王倩",
              categoryType: "user",
            },
            {
              id: "1595391665929650178",
              parentId: "421182040701",
              name: "黄其华",
              categoryType: "user",
            },
          ],
          name: "向文村卫生室",
          categoryType: "org",
        },
        {
          id: "421182040801",
          parentId: 0,
          children: [
            {
              id: "1595391922461671425",
              parentId: "421182040801",
              name: "李必峰",
              categoryType: "user",
            },
            {
              id: "1595392041563127809",
              parentId: "421182040801",
              name: "朱雄杰",
              categoryType: "user",
            },
            {
              id: "1595392202544709633",
              parentId: "421182040801",
              name: "李君念",
              categoryType: "user",
            },
            {
              id: "1597160699935219714",
              parentId: "421182040801",
              name: "牛车测试",
              categoryType: "user",
            },
          ],
          name: "牛车村卫生室",
          categoryType: "org",
        },
      ],
      transForm: [],
      defaultProps: {
        children: "children",
        label: "name",
        pid: "parentId",
        key: "id",
      },
      defaultCheckedKeys: [],
      ruleForm: {},
      tableData: [],
      total: 0,
      page: {
        pageSize: 5,
        pageNum: 1,
      },
      warningForm: {},
      warningRules: {
        recheckId: [
          { required: true, message: "请选择复查消息模板", trigger: "change" },
        ],
        warningId: [
          { required: true, message: "请选择预警消息模板", trigger: "change" },
        ],
      },
    };
  },
  computed: {
    key() {
      return this.$route.path;
    },
    dataJ() {
      return [
        {
          label: "药品名称",
          prop: "medicineName",
          type: "input",
          placeholder: "请输入名称",
        },
        {
          label: "生产厂家",
          prop: "medicineFactoryName",
          type: "input",
        },
        {
          label: "药品剂型",
          prop: "medicineModelCode",
          type: "select",
          options: [],
        },
      ];
    },
    tableJ() {
      return [
        {
          label: "姓名",
          prop: "xm",
          showTooltip: true,
        },
        {
          label: "身份证",
          prop: "sfzh",
          showTooltip: true,
        },
        {
          label: "门诊-住院病历号",
          prop: "mzh",
          showTooltip: true,
        },
        {
          label: "检验名称",
          prop: "jymc",
          showTooltip: true,
        },
        {
          label: "临床诊断",
          prop: "lczd",
          showTooltip: true,
        },
        {
          label: "检验时间",
          prop: "jysj",
          showTooltip: true,
        },
        {
          label: "样本类型",
          prop: "yblx",
          showTooltip: true,
        },
        {
          label: "项目名称",
          prop: "xmmc",
        },
        {
          label: "子项目名称",
          prop: "zxmmc",
          showTooltip: true,
        },
        {
          label: "结果",
          prop: "jg",
          showTooltip: true,
        },
        {
          label: "单位",
          prop: "dw",
        },
        {
          label: "参考值",
          prop: "ckz",
          showTooltip: true,
        },
      ];
    },
    warningData() {
      return [
        {
          label: "复查消息模板",
          prop: "recheckId",
          width: "60%",
          labelWidth: "110px",
          type: "input",
        },
        {
          label: "预警消息模板",
          prop: "warningId",
          width: "60%",
          labelWidth: "110px",
          type: "input",
        },
      ];
    },
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    cancelPerson() {},
    surePerson() {},
    searchForm() {},
    getList() {},
  },
};
</script>

<style scoped lang='less'>
</style>